package com.lagou.edu.controller;

import com.lagou.edu.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: stage-3-module-3
 * @description:
 * @author: zhangxiaoyang
 * @date: 2020-09-01 06:04
 **/
@RestController
@RequestMapping("/")
public class HelloController {

    @Autowired
    private HelloService helloService;

    @GetMapping(value = "/hello",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public String sayHello(String param) {
        return helloService.sayHello(param);
    }
}
